package com.yic.module.system.api.logger.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Map;

import static com.yic.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 第三方系统API日志创建 Request DTO
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExternalLogCreateReqDTO {

    @NotNull(message = "系统类型不能为空")
    private Integer systemType;

    @NotNull(message = "操作名称不能为空")
    private String name;

    private String url;

    private String requset;

    private String response;

    private String code;

    private String description;

    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime startTime;

    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime endTime;

    private Integer duration;

    private Integer status;

}
